/**
 * 
 */
package com.uottawa.clickerapp.domain;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;

import com.uottawa.clickerapp.dao.impl.*;

/**
 * @author Liam
 */
@XmlRootElement
public class QuestionSession extends DataStoreEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String Keyword;
	private String password;
	private List<Question> questions;

	public String getKeyword() {
		return Keyword;
	}
	
	public void setKeyword(String keyword) {
		Keyword = keyword;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public List<Question> getQuestions(){
		return questions;
	}
	
	
	public void setQuestions(List<Question> questions) {
		this.questions = questions;
	}

	public void save(){
		SQLDBHelper.store(this);
	}
	
	public void fetch(){
		if (this.ID != 0){ 
			SQLDBHelper.fetch(this);
		}
	}
	
	public void delete(){
		SQLDBHelper.delete(this);
	}

}
